/** @namespace app.spider.TypeData */
module.exports = app => {
  const {BIGINT, INTEGER, DATEONLY} = app.Sequelize;
  const TypeData = app.spider.define('type_data', {
    rank: {type: INTEGER.UNSIGNED, defaultValue: 0},//根据相同平台的活跃主播数量排序
    num_active: {type: INTEGER.UNSIGNED, defaultValue: 0},//活跃主播的数量
    num_new: {type: INTEGER.UNSIGNED, defaultValue: 0},//新增主播的数量
    num_open: {type: INTEGER.UNSIGNED, defaultValue: 0},//主播开播的数量
    num_gift: {type: BIGINT.UNSIGNED, defaultValue: 0},//礼物价值
    num_watch: {type: BIGINT.UNSIGNED, defaultValue: 0},//观看人数
    num_follower: {type: INTEGER.UNSIGNED, defaultValue: 0},//关注人数
    created_at: {type: DATEONLY, defaultValue: app.Sequelize.NOW},
  }, {
    tableName: 'spider_type_data',
  });

  return TypeData;
};